package com.jlnk.petdemo.entity;

import android.os.Parcel;
import android.os.Parcelable;

public class PetModel implements Parcelable {
    private int pettype;
    private String name;
    private String engName;
    private String characters;
    private String nation;
    private String easyOfDisease;
    private String life;
    private String price;
    private String desc;
    private String feature;
    private String characterFeature;
    private String careKnowledge;
    private String feedPoints;
    private String url;
    private String coverURL;

    // 构造函数
    public PetModel(int pettype, String name, String engName, String characters, String nation,
                    String easyOfDisease, String life, String price, String desc, String feature,
                    String characterFeature, String careKnowledge, String feedPoints, String url, String coverURL) {
        this.pettype = pettype;
        this.name = name;
        this.engName = engName;
        this.characters = characters;
        this.nation = nation;
        this.easyOfDisease = easyOfDisease;
        this.life = life;
        this.price = price;
        this.desc = desc;
        this.feature = feature;
        this.characterFeature = characterFeature;
        this.careKnowledge = careKnowledge;
        this.feedPoints = feedPoints;
        this.url = url;
        this.coverURL = coverURL;
    }

    // 从 Parcel 中创建对象
    protected PetModel(Parcel in) {
        pettype = in.readInt();
        name = in.readString();
        engName = in.readString();
        characters = in.readString();
        nation = in.readString();
        easyOfDisease = in.readString();
        life = in.readString();
        price = in.readString();
        desc = in.readString();
        feature = in.readString();
        characterFeature = in.readString();
        careKnowledge = in.readString();
        feedPoints = in.readString();
        url = in.readString();
        coverURL = in.readString();
    }

    public static final Creator<PetModel> CREATOR = new Creator<PetModel>() {
        @Override
        public PetModel createFromParcel(Parcel in) {
            return new PetModel(in);
        }

        @Override
        public PetModel[] newArray(int size) {
            return new PetModel[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(pettype);
        dest.writeString(name);
        dest.writeString(engName);
        dest.writeString(characters);
        dest.writeString(nation);
        dest.writeString(easyOfDisease);
        dest.writeString(life);
        dest.writeString(price);
        dest.writeString(desc);
        dest.writeString(feature);
        dest.writeString(characterFeature);
        dest.writeString(careKnowledge);
        dest.writeString(feedPoints);
        dest.writeString(url);
        dest.writeString(coverURL);
    }

    // Getter 和 Setter 方法
    public int getPettype() {
        return pettype;
    }

    public void setPettype(int pettype) {
        this.pettype = pettype;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getEngName() {
        return engName;
    }

    public void setEngName(String engName) {
        this.engName = engName;
    }

    public String getCharacters() {
        return characters;
    }

    public void setCharacters(String characters) {
        this.characters = characters;
    }

    public String getNation() {
        return nation;
    }

    public void setNation(String nation) {
        this.nation = nation;
    }

    public String getEasyOfDisease() {
        return easyOfDisease;
    }

    public void setEasyOfDisease(String easyOfDisease) {
        this.easyOfDisease = easyOfDisease;
    }

    public String getLife() {
        return life;
    }

    public void setLife(String life) {
        this.life = life;
    }

    public String getPrice() {
        return price;
    }

    public void setPrice(String price) {
        this.price = price;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public String getFeature() {
        return feature;
    }

    public void setFeature(String feature) {
        this.feature = feature;
    }

    public String getCharacterFeature() {
        return characterFeature;
    }

    public void setCharacterFeature(String characterFeature) {
        this.characterFeature = characterFeature;
    }

    public String getCareKnowledge() {
        return careKnowledge;
    }

    public void setCareKnowledge(String careKnowledge) {
        this.careKnowledge = careKnowledge;
    }

    public String getFeedPoints() {
        return feedPoints;
    }

    public void setFeedPoints(String feedPoints) {
        this.feedPoints = feedPoints;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getCoverURL() {
        return coverURL;
    }

    public void setCoverURL(String coverURL) {
        this.coverURL = coverURL;
    }
}